import matplotlib.pyplot as plt
import numpy as np


def testLJ():
    rs = []
    ljs = []
    for r in np.arange(0.1, 3, 0.01):
        rs.append(r)
        ljs.append(4 * (r ** (-12) - r ** (-6)))
    plt.xlabel("Euclidean distance")
    plt.ylabel("Lennard-Jones potential energy")
    plt.title("Lennard-Jones")
    plt.plot(rs, ljs)
    plt.ylim(-2, 5)
    plt.savefig("../image/objectFunc/LJ")
    plt.show()


def testSutton():
    c = 2
    a = 1
    m = 1

    suttons = []
    rs = []
    for r in np.arange(0.1, 3, 0.01):
        p_i = (a / r) ** m
        p_1 = (a / r)
        sutton = 4 * (0.5 * p_1 - c * np.sqrt(p_i))
        rs.append(r)
        suttons.append(sutton)
    plt.title("Sutton-Chen")
    plt.xlabel("Euclidean distance")
    plt.ylabel("Sutton-chen potential energy")
    plt.plot(rs, suttons)
    plt.legend()
    plt.savefig("../image/objectFunc/Sutton-chen")
    plt.show()
